import java.util.Scanner;
public class Test018 {
    public static void main(String[] args) {
        login();
    }

    public static void login() {
        int count = 3;
        Scanner scan = new Scanner(System.in);
        while(count !=0){
            System.out.println("请输入你的密码：");
            String password = scan.nextLine();
            if(password.equals("123")){
                System.out.println("登录成功");
                return;
            }else{
                count--;System.out.println("您还剩"+count+"次输入机会");
            }
        }
    }
}